package conm.jnmd.exception;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ModelAndView;

public class HandlerException implements HandlerExceptionResolver{

	@Override
	public ModelAndView resolveException(HttpServletRequest arg0,
			HttpServletResponse arg1, Object arg2, Exception arg3) {
		
		ModelAndView modelAndView =new ModelAndView();
		modelAndView.addObject("message", "智障");
		modelAndView.setViewName("error");
		return modelAndView;
	}
}
